Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/RasterOverlayToggles.kt renovate/fastlane-2.x-lockfile (056eed64) Text, 2.76 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.map.component

Tff7b72import T7ee787androidx.compose.foundation.layout.Column
Tff7b72import T7ee787androidx.compose.material3.Checkbox
Tff7b72import T7ee787androidx.compose.material3.ListItem
Tff7b72import T7ee787androidx.compose.material3.Text
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.feature.map.layers.opacityOf
Tff7b72import T7ee787org.meshtastic.feature.map.tiles.RasterOverlaySource

T8b949e/**
* Checkboxes for the raster overlays a map can composite over its basemap.
*
* Both flavours show these in their layers sheet. What differs is [available]: the MapLibre map offers every catalogue
* overlay, while the Google map filters out the DEM-encoded ones, whose pixels are elevation rather than imagery and
* would draw as noise without a renderer that shades them.
*
* Terrain shading is the exception to the opacity slider meaning what it says: hillshade has no opacity property in the
* style spec, so its renderer fades the shading's own colours instead. See MapOverlayLayers.
*/
Tf0883e@Composable
Tff7b72fun Td2a8ffRasterOverlayTogglesTb4b4b4(
Te6edf3availableTb4b4b4: Te6edf3ListTff7b72<Te6edf3RasterOverlaySourceTff7b72>Tb4b4b4,
Te6edf3enabledIdsTb4b4b4: Te6edf3SetTff7b72<Tffa657StringTff7b72>Tb4b4b4,
Te6edf3onToggleTb4b4b4: Tb4b4b4(Tffa657StringTb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3opacityTb4b4b4: Te6edf3MapTff7b72<Tffa657StringTb4b4b4, Tffa657FloatTff7b72>Tb4b4b4,
Te6edf3onOpacityChangeTb4b4b4: Tb4b4b4(Tffa657StringTb4b4b4, Tffa657FloatTb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3modifierTb4b4b4: Te6edf3Modifier Tff7b72= Te6edf3ModifierTb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3ColumnTb4b4b4(Te6edf3modifier Tff7b72= Te6edf3modifierTb4b4b4) Tb4b4b4{
Te6edf3availableTb4b4b4.Te6edf3forEach Tb4b4b4{ Te6edf3overlay Tff7b72-Tff7b72>
Tff7b72val Te6edf3enabled Tff7b72= Te6edf3overlayTb4b4b4.Te6edf3id Tff7b72in Te6edf3enabledIds
Te6edf3ListItemTb4b4b4(
Te6edf3headlineContent Tff7b72= Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3text Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3overlayTb4b4b4.Te6edf3labelTb4b4b4)Tb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3trailingContent Tff7b72= Tb4b4b4{ Te6edf3CheckboxTb4b4b4(Te6edf3checked Tff7b72= Te6edf3enabledTb4b4b4, Te6edf3onCheckedChange Tff7b72= Tb4b4b4{ Te6edf3onToggleTb4b4b4(Te6edf3overlayTb4b4b4.Te6edf3idTb4b4b4) Tb4b4b4}Tb4b4b4) Tb4b4b4}Tb4b4b4,
Tb4b4b4)
T8b949e// Only for an overlay that is actually drawing: a slider under an unchecked row controls nothing.
Tff7b72if Tb4b4b4(Te6edf3enabledTb4b4b4) Tb4b4b4{
Te6edf3LayerOpacitySliderTb4b4b4(
Te6edf3layerKey Tff7b72= Te6edf3overlayTb4b4b4.Te6edf3idTb4b4b4,
Te6edf3opacity Tff7b72= Te6edf3opacityTb4b4b4.Te6edf3opacityOfTb4b4b4(Te6edf3overlayTb4b4b4.Te6edf3idTb4b4b4)Tb4b4b4,
Te6edf3onOpacityChange Tff7b72= Te6edf3onOpacityChangeTb4b4b4,
Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.2 - Generated in 0.12s